from starlette.endpoints import HTTPEndpoint
from starlette.responses import JSONResponse
from database import Session, engine
import datetime
from dao import DaoAreaList



class AreaList(HTTPEndpoint):

    async def get(self, request):
        session = Session()
        try:
           return  DaoAreaList.get_area_list(session)
        finally:
            session.close()

